<!DOCTYPE html>
<html>
	<head>
		
		<meta charset="utf-8" />
		<title>鉴宝</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="format-detection" content="telephone=no"  />
		<meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
		<link rel="stylesheet" href="css/css.css" />
		<script type="text/javascript" src="js/jquery-1.7.1.min.js" ></script>
		<script type="text/javascript" src="js/all.js" ></script>
    </head>
	<body style="background:url(img/user_banner.jpg) no-repeat center center;">
		<div class="wapper">
			<header>
				<div class="goback"><a href=""><img src="img/back.png" /> <span>返回</span></a></div>
				<div class="midtit">个人中心</div>
				<div class="morshar"><a href="">...</a></div>
			</header>
            
            <section class="U_sect">
                <section class="U_sj">
                        <div class="div-phone">
                            <input type="text" id="phone" class="infos" placeholder="请输入手机" />
                            <a href="javascript:;" class="send1" onclick="sends.send();">发送验证码</a>
                        </div>
                        
                </section>
                
                <section class="U_sj U_yzm">
                         <input type="text" id="phone" class="inf" placeholder="请输入验证码" />
                </section>
            </section>
            
            
            
            
            
<script type="text/javascript">
var sends = {
	checked:1,
	send:function(){
			var numbers = /^1\d{10}$/;
			var val = $('#phone').val().replace(/\s+/g,""); //获取输入手机号码
			if($('.div-phone').find('span').length == 0 && $('.div-phone a').attr('class') == 'send1'){
				if(!numbers.test(val) || val.length ==0){
					$('.div-phone').append('<span class="error">手机格式错误</span>');
					return false;
				}
				
			}
			if(numbers.test(val)){
				var time = 30;
				$('.div-phone span').remove();
				function timeCountDown(){
					if(time==0){
						clearInterval(timer);
						$('.div-phone a').addClass('send1').removeClass('send0').html("发送验证码");
						sends.checked = 1;
						return true;
					}
					$('.div-phone a').html(time+"S后再次发送");
					time--;
					$('.div-phone a').removeAttr('onclick');;
					return false;
					sends.checked = 0;
				}
				$('.div-phone a').addClass('send0').removeClass('send1');
				timeCountDown();
				var timer = setInterval(timeCountDown,1000);
			}
	}
}
</script>            
            
			
			
			<footer>
				<ul>
					<li><a href="">
						<p class="icoimg"><img src="img/home.png"  /></p>
						<p>首页</p>
					</a>
					</li>
					<li><a href="">
						<p class="icoimg"><img src="img/zj.png" /></p>
						<p>专家</p>
						</a>
					</li>
					<li><a href="">
						<p class="icoimg"><img src="img/yyclass.png" /></p>
						<p>语音课堂</p>
						</a>
					</li>
				</ul>
			</footer>
		</div>
	</body>
</html>
